/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2015.07.13                                          *
 * Description:      an implement to input database for using map type   *
 *                                                                       *
 *************************************************************************/

namespace FreeMAPs
{

inline bool
MapDatabase::key_exists (
    const std::string& key) const
{
    return (d_string_string_maps.count (key) > 0);
}


inline DataType
MapDatabase::get_key_type (
    const std::string& key) const
{
    DataType type = DataType::UNKNOWN;

    if (d_string_string_maps.count (key) > 0)
    {
        type = DataType::STRING_STRING_MAP;
    }

    return type;
}

}
